package coop.tecso.test.objets.complex;

//src/gen
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinColumns;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Version;

/**
 *
 */
@Entity
@Table(name = "COUPON_USED")
public class CouponUsed implements java.io.Serializable {
	private static final long serialVersionUID = 1L;
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO, generator = "COUPON_USED_SEQ")
	@SequenceGenerator(name = "COUPON_USED_SEQ", sequenceName = "COUPON_USED_SEQ", allocationSize = 1)
	@Column(name = "COUPON_USED_ID", nullable = false)
	private int id;
	@Version
	@Column(name = "VERSION")
	private int couponUsedversion;

	/**
	 *
	 */
	@Basic(optional = false)
	@Column(name = "COUPON", nullable = false, length = 1)
	private int coupon;

	/**
	 *
	 */
	@Basic(optional = false)
	@Temporal(TemporalType.DATE)
	@Column(name = "USED_DATE", nullable = false)
	private java.util.Date usedDate;

	/**
	 *
	 */
	@Basic(optional = false)
	@Column(name = "AIRLINE", nullable = false, length = 3)
	private String airline;

	/**
	 *
	 */
	@Basic(optional = false)
	@Column(name = "TICKET", nullable = false, length = 10)
	private String ticket;

	/**
	 *
	 */
	@Column(name = "TICKET_CD", length = 1)
	private String ticketCd;

	/**
	 *
	 */
	@Column(name = "RBD", length = 2)
	private String rbd;

	/**
	 *
	 */
	@Column(name = "INTERNATIONAL_SALE_INDICATOR", length = 4)
	private String internationalSaleIndicator;

	/**
	 *
	 */
	@Column(name = "DOMESTIC")
	private Boolean domestic;

	/**
	 *
	 */
	@Column(name = "PNR", length = 13)
	private String pnr;

	/**
	 *
	 */
	@Column(name = "AGENCY_CODE", length = 7)
	private String agencyCode;

	/**
	 *
	 */
	@Column(name = "TOUR_CODE", length = 15)
	private String tourCode;

	/**
	 *
	 */
	@Temporal(TemporalType.DATE)
	@Column(name = "ISSUE_DATE", length = 6)
	private java.util.Date issueDate;

	/**
	 *
	 */
	@Column(name = "ETKT", length = 1)
	private Boolean etkt;

	/**
	 *
	 */
	@Column(name = "OCCURRENCY")
	private Long occurrency;

	/**
	 *
	 */
	@Column(name = "REPORTED_FARE", length = 12)
	private java.math.BigDecimal reportedFare;

	/**
	 *
	 */
	@Column(name = "REPORTED_FARE_CURRENCY", length = 3)
	private String reportedFareCurrency;

	/**
	 *
	 */
	@Column(name = "REPORTED_PAYMENT_FARE", length = 12)
	private java.math.BigDecimal reportedPaymentFare;

	/**
	 *
	 */
	@Column(name = "REPORTED_PAYMENT_CURRENCY", length = 3)
	private String reportedPaymentCurrency;

	/**
	 *
	 */
	@Column(name = "REPORTED_FARE_BASIS", length = 15)
	private String reportedFareBasis;

	/**
	 *
	 */
	@Column(name = "TEC_CREATION_USER", length = 255)
	private String tecCreationUser;

	/**
	 *
	 */
	@Column(name = "TEC_CREATION_TIMESTAMP")
	private java.sql.Timestamp tecCreationTimestamp;

	/**
	 *
	 */
	@Column(name = "TEC_MODIFICATION_TIMESTAMP")
	private java.sql.Timestamp tecModificationTimestamp;

	/**
	 *
	 */
	@Column(name = "TEC_MODIFICATION_USER", length = 255)
	private String tecModificationUser;

	/**
	 *
	 */
	@Column(name = "TEC_DELETED")
	private Boolean tecDeleted;

	/**
	 *
	 */
	@Column(name = "TEC_BATCH_PROCESS_ID")
	private Integer tecBatchProcessId;

	/**
	 *
	 */
	@Column(name = "INPUT_PROCESS_FK", length = 10)
	private Integer inputProcessFk;

	/**
	 *
	 */
	@OneToMany(targetEntity = CouponUsedStHs.class, mappedBy = "couponUsed", fetch = FetchType.LAZY)
	private java.util.Set<CouponUsedStHs> couponUsedStHs = new java.util.HashSet<CouponUsedStHs>();

	/**
	 *
	 */
	@OneToMany(targetEntity = CouponValue.class, mappedBy = "couponUsed", fetch = FetchType.LAZY)
	private java.util.Set<CouponValue> couponValue = new java.util.HashSet<CouponValue>();

	/**
	 *
	 */
	@OneToMany(targetEntity = CouponUsedError.class, mappedBy = "couponUsed", fetch = FetchType.LAZY)
	private java.util.Set<CouponUsedError> couponUsedError = new java.util.HashSet<CouponUsedError>();

	/**
	 *
	 */
	@OneToMany(targetEntity = CouponBilled.class, mappedBy = "couponUsed", fetch = FetchType.LAZY)
	private java.util.Set<CouponBilled> couponBilled = new java.util.HashSet<CouponBilled>();

	/**
	 *
	 */
	@OneToMany(targetEntity = CouponRefund.class, mappedBy = "couponUsed", fetch = FetchType.LAZY)
	private java.util.Set<CouponRefund> couponRefund = new java.util.HashSet<CouponRefund>();

	/**
	 *
	 */
	@OneToMany(targetEntity = CouponLost.class, mappedBy = "couponUsed", fetch = FetchType.LAZY)
	private java.util.Set<CouponLost> couponLost = new java.util.HashSet<CouponLost>();

	/**
	 *
	 */
	@OneToMany(targetEntity = CouponExpired.class, mappedBy = "couponUsed", fetch = FetchType.LAZY)
	private java.util.Set<CouponExpired> couponExpired = new java.util.HashSet<CouponExpired>();

	/**
	 *
	 */
	@OneToMany(targetEntity = CouponExchanged.class, mappedBy = "couponUsed", fetch = FetchType.LAZY)
	private java.util.Set<CouponExchanged> couponExchanged = new java.util.HashSet<CouponExchanged>();

	/**
	 *
	 */
	@OneToOne(targetEntity = Sac.class, mappedBy = "couponUsed", fetch = FetchType.LAZY)
	@JoinColumns({ @JoinColumn(name = "SAC_FK", referencedColumnName = "SAC_ID") })
	private Sac sac;

	/**
	 *
	 */
	@OneToOne(targetEntity = CouponFlownMpd.class, mappedBy = "couponUsed", fetch = FetchType.LAZY)
	@JoinColumns({ @JoinColumn(name = "COUPON_FLOWN_MPD_FK", referencedColumnName = "COUPON_FLOWN_MPD_ID") })
	private CouponFlownMpd couponFlownMpd;

	/**
	 *
	 */
	@OneToOne(targetEntity = CouponFlown.class, mappedBy = "couponUsed", fetch = FetchType.LAZY)
	@JoinColumns({ @JoinColumn(name = "COUPON_FLOWN_FK", referencedColumnName = "COUPON_FLOWN_ID") })
	private CouponFlown couponFlown;

	/**
	 *
	 */
	@ManyToOne(targetEntity = UseType.class, optional = false, fetch = FetchType.LAZY)
	@JoinColumns({ @JoinColumn(name = "USE_TYPE_FK", referencedColumnName = "CODE", nullable = false) })
	private UseType useType;

	/**
	 *
	 */
	@OneToOne(targetEntity = CouponUsedSt.class, mappedBy = "couponUsed", optional = false, fetch = FetchType.LAZY)
	@JoinColumns({ @JoinColumn(name = "COUPON_USED_ST_FK", referencedColumnName = "COUPON_USED_ST_ID", nullable = false) })
	private CouponUsedSt couponUsedSt;

	/**
	 *
	 */
	@OneToOne(targetEntity = CouponFlownXsb.class, mappedBy = "couponUsed", fetch = FetchType.LAZY)
	@JoinColumns({ @JoinColumn(name = "COUPON_FLOWN_XSB_FK", referencedColumnName = "COUPON_FLOWN_XSB_ID") })
	private CouponFlownXsb couponFlownXsb;

	/**
	 *
	 */
	@OneToOne(targetEntity = CouponFlownMco.class, mappedBy = "couponUsed", fetch = FetchType.LAZY)
	@JoinColumns({ @JoinColumn(name = "COUPON_FLOWN_MCO_FK", referencedColumnName = "COUPON_FLOWN_MCO_ID") })
	private CouponFlownMco couponFlownMco;

	/**
	 *
	 */
	@OneToOne(targetEntity = CouponUsedMultiple.class, mappedBy = "couponUsed", fetch = FetchType.LAZY)
	@JoinColumns({ @JoinColumn(name = "COUPON_USED_MULTIPLE_FK", referencedColumnName = "COUPON_USED_MULTIPLE_ID") })
	private CouponUsedMultiple couponUsedMultiple;

	public CouponUsed() {
	}

	// Constructor for primary key
	public CouponUsed(int id) {
		this.id = id;
	}

	/**
	 * Autogenerated key
	 */
	public int getId() {
		return id;
	}

	public int getCouponUsedversion() {
		return couponUsedversion;
	}

	public void setCouponUsedversion(int couponUsedversion) {
		this.couponUsedversion = couponUsedversion;
	}

	public int getCoupon() {
		return coupon;
	}

	public void setCoupon(int coupon) {
		this.coupon = coupon;
	}

	public java.util.Date getUsedDate() {
		return usedDate;
	}

	public void setUsedDate(java.util.Date usedDate) {
		this.usedDate = usedDate;
	}

	public String getAirline() {
		return airline;
	}

	public void setAirline(String airline) {
		this.airline = airline;
	}

	public String getTicket() {
		return ticket;
	}

	public void setTicket(String ticket) {
		this.ticket = ticket;
	}

	public String getTicketCd() {
		return ticketCd;
	}

	public void setTicketCd(String ticketCd) {
		this.ticketCd = ticketCd;
	}

	public String getRbd() {
		return rbd;
	}

	public void setRbd(String rbd) {
		this.rbd = rbd;
	}

	public String getInternationalSaleIndicator() {
		return internationalSaleIndicator;
	}

	public void setInternationalSaleIndicator(String internationalSaleIndicator) {
		this.internationalSaleIndicator = internationalSaleIndicator;
	}

	public Boolean getDomestic() {
		return domestic;
	}

	public void setDomestic(Boolean domestic) {
		this.domestic = domestic;
	}

	public String getPnr() {
		return pnr;
	}

	public void setPnr(String pnr) {
		this.pnr = pnr;
	}

	public String getAgencyCode() {
		return agencyCode;
	}

	public void setAgencyCode(String agencyCode) {
		this.agencyCode = agencyCode;
	}

	public String getTourCode() {
		return tourCode;
	}

	public void setTourCode(String tourCode) {
		this.tourCode = tourCode;
	}

	public java.util.Date getIssueDate() {
		return issueDate;
	}

	public void setIssueDate(java.util.Date issueDate) {
		this.issueDate = issueDate;
	}

	public Boolean getEtkt() {
		return etkt;
	}

	public void setEtkt(Boolean etkt) {
		this.etkt = etkt;
	}

	public Long getOccurrency() {
		return occurrency;
	}

	public void setOccurrency(Long occurrency) {
		this.occurrency = occurrency;
	}

	public java.math.BigDecimal getReportedFare() {
		return reportedFare;
	}

	public void setReportedFare(java.math.BigDecimal reportedFare) {
		this.reportedFare = reportedFare;
	}

	public String getReportedFareCurrency() {
		return reportedFareCurrency;
	}

	public void setReportedFareCurrency(String reportedFareCurrency) {
		this.reportedFareCurrency = reportedFareCurrency;
	}

	public java.math.BigDecimal getReportedPaymentFare() {
		return reportedPaymentFare;
	}

	public void setReportedPaymentFare(java.math.BigDecimal reportedPaymentFare) {
		this.reportedPaymentFare = reportedPaymentFare;
	}

	public String getReportedPaymentCurrency() {
		return reportedPaymentCurrency;
	}

	public void setReportedPaymentCurrency(String reportedPaymentCurrency) {
		this.reportedPaymentCurrency = reportedPaymentCurrency;
	}

	public String getReportedFareBasis() {
		return reportedFareBasis;
	}

	public void setReportedFareBasis(String reportedFareBasis) {
		this.reportedFareBasis = reportedFareBasis;
	}

	public String getTecCreationUser() {
		return tecCreationUser;
	}

	public void setTecCreationUser(String tecCreationUser) {
		this.tecCreationUser = tecCreationUser;
	}

	public java.sql.Timestamp getTecCreationTimestamp() {
		return tecCreationTimestamp;
	}

	public void setTecCreationTimestamp(java.sql.Timestamp tecCreationTimestamp) {
		this.tecCreationTimestamp = tecCreationTimestamp;
	}

	public java.sql.Timestamp getTecModificationTimestamp() {
		return tecModificationTimestamp;
	}

	public void setTecModificationTimestamp(java.sql.Timestamp tecModificationTimestamp) {
		this.tecModificationTimestamp = tecModificationTimestamp;
	}

	public String getTecModificationUser() {
		return tecModificationUser;
	}

	public void setTecModificationUser(String tecModificationUser) {
		this.tecModificationUser = tecModificationUser;
	}

	public Boolean getTecDeleted() {
		return tecDeleted;
	}

	public void setTecDeleted(Boolean tecDeleted) {
		this.tecDeleted = tecDeleted;
	}

	public Integer getTecBatchProcessId() {
		return tecBatchProcessId;
	}

	public void setTecBatchProcessId(Integer tecBatchProcessId) {
		this.tecBatchProcessId = tecBatchProcessId;
	}

	public Integer getInputProcessFk() {
		return inputProcessFk;
	}

	public void setInputProcessFk(Integer inputProcessFk) {
		this.inputProcessFk = inputProcessFk;
	}

	public java.util.Set<CouponUsedStHs> getCouponUsedStHs() {
		return couponUsedStHs;
	}

	public void setCouponUsedStHs(java.util.Set<CouponUsedStHs> couponUsedStHs) {
		this.couponUsedStHs = couponUsedStHs;
	}

	public void addCouponUsedStHs(CouponUsedStHs couponUsedStHs) {
		this.couponUsedStHs.add(couponUsedStHs);
	}

	public void removeCouponUsedStHs(CouponUsedStHs couponUsedStHs) {
		this.couponUsedStHs.remove(couponUsedStHs);
	}

	public java.util.Set<CouponValue> getCouponValue() {
		return couponValue;
	}

	public void setCouponValue(java.util.Set<CouponValue> couponValue) {
		this.couponValue = couponValue;
	}

	public void addCouponValue(CouponValue couponValue) {
		this.couponValue.add(couponValue);
	}

	public void removeCouponValue(CouponValue couponValue) {
		this.couponValue.remove(couponValue);
	}

	public java.util.Set<CouponUsedError> getCouponUsedError() {
		return couponUsedError;
	}

	public void setCouponUsedError(java.util.Set<CouponUsedError> couponUsedError) {
		this.couponUsedError = couponUsedError;
	}

	public void addCouponUsedError(CouponUsedError couponUsedError) {
		this.couponUsedError.add(couponUsedError);
	}

	public void removeCouponUsedError(CouponUsedError couponUsedError) {
		this.couponUsedError.remove(couponUsedError);
	}

	public java.util.Set<CouponBilled> getCouponBilled() {
		return couponBilled;
	}

	public void setCouponBilled(java.util.Set<CouponBilled> couponBilled) {
		this.couponBilled = couponBilled;
	}

	public void addCouponBilled(CouponBilled couponBilled) {
		this.couponBilled.add(couponBilled);
	}

	public void removeCouponBilled(CouponBilled couponBilled) {
		this.couponBilled.remove(couponBilled);
	}

	public java.util.Set<CouponRefund> getCouponRefund() {
		return couponRefund;
	}

	public void setCouponRefund(java.util.Set<CouponRefund> couponRefund) {
		this.couponRefund = couponRefund;
	}

	public void addCouponRefund(CouponRefund couponRefund) {
		this.couponRefund.add(couponRefund);
	}

	public void removeCouponRefund(CouponRefund couponRefund) {
		this.couponRefund.remove(couponRefund);
	}

	public java.util.Set<CouponLost> getCouponLost() {
		return couponLost;
	}

	public void setCouponLost(java.util.Set<CouponLost> couponLost) {
		this.couponLost = couponLost;
	}

	public void addCouponLost(CouponLost couponLost) {
		this.couponLost.add(couponLost);
	}

	public void removeCouponLost(CouponLost couponLost) {
		this.couponLost.remove(couponLost);
	}

	public java.util.Set<CouponExpired> getCouponExpired() {
		return couponExpired;
	}

	public void setCouponExpired(java.util.Set<CouponExpired> couponExpired) {
		this.couponExpired = couponExpired;
	}

	public void addCouponExpired(CouponExpired couponExpired) {
		this.couponExpired.add(couponExpired);
	}

	public void removeCouponExpired(CouponExpired couponExpired) {
		this.couponExpired.remove(couponExpired);
	}

	public java.util.Set<CouponExchanged> getCouponExchanged() {
		return couponExchanged;
	}

	public void setCouponExchanged(java.util.Set<CouponExchanged> couponExchanged) {
		this.couponExchanged = couponExchanged;
	}

	public void addCouponExchanged(CouponExchanged couponExchanged) {
		this.couponExchanged.add(couponExchanged);
	}

	public void removeCouponExchanged(CouponExchanged couponExchanged) {
		this.couponExchanged.remove(couponExchanged);
	}

	public Sac getSac() {
		return sac;
	}

	public void setSac(Sac sac) {
		this.sac = sac;
	}

	public CouponFlownMpd getCouponFlownMpd() {
		return couponFlownMpd;
	}

	public void setCouponFlownMpd(CouponFlownMpd couponFlownMpd) {
		this.couponFlownMpd = couponFlownMpd;
	}

	public CouponFlown getCouponFlown() {
		return couponFlown;
	}

	public void setCouponFlown(CouponFlown couponFlown) {
		this.couponFlown = couponFlown;
	}

	public UseType getUseType() {
		return useType;
	}

	public void setUseType(UseType useType) {
		this.useType = useType;
	}

	public CouponUsedSt getCouponUsedSt() {
		return couponUsedSt;
	}

	public void setCouponUsedSt(CouponUsedSt couponUsedSt) {
		this.couponUsedSt = couponUsedSt;
	}

	public CouponFlownXsb getCouponFlownXsb() {
		return couponFlownXsb;
	}

	public void setCouponFlownXsb(CouponFlownXsb couponFlownXsb) {
		this.couponFlownXsb = couponFlownXsb;
	}

	public CouponFlownMco getCouponFlownMco() {
		return couponFlownMco;
	}

	public void setCouponFlownMco(CouponFlownMco couponFlownMco) {
		this.couponFlownMco = couponFlownMco;
	}

	public CouponUsedMultiple getCouponUsedMultiple() {
		return couponUsedMultiple;
	}

	public void setCouponUsedMultiple(CouponUsedMultiple couponUsedMultiple) {
		this.couponUsedMultiple = couponUsedMultiple;
	}
}
